package com.yike.product.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.yike.common.api.Update;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 条码库
 *
 * @author yike
 * @since 2024-07-17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("qy_barcode")
@ApiModel(value = "Barcode对象")
public class Barcode extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "条形码不能为空")
    @ApiModelProperty("条形码")
    private String code;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("图片地址")
    private String goodsImage;

    @ApiModelProperty("厂商")
    private String manufacturerName;

    @ApiModelProperty("厂商地址")
    private String manufacturerAddress;

    @ApiModelProperty("参考价格(单位:元)")
    private BigDecimal price;

    @ApiModelProperty("商品进价")
    private BigDecimal buyPrice;

    @ApiModelProperty("原产地")
    private String origin;

    @ApiModelProperty("备注信息")
    private String remark;

    @ApiModelProperty("分类id")
    private Long categoryId;

    @ApiModelProperty("品牌id")
    private Long brandId;

    @ApiModelProperty("规格id")
    private Long specificationId;

    @ApiModelProperty("单位id")
    private Long unitId;

    @ApiModelProperty("供应商ID")
    private Long supplierId;

    @ApiModelProperty("毛利率（%）")
    private BigDecimal grossMargin;

    @ApiModelProperty("到期时间")
    private String expireTime;

}
